home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Prog / M / MPWGCC (Misc).cpt / Bison / Miscellaneous / calc.tab.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-03-14  |  16.4 KB  |  651 lines  |  [TEXT/MPS ]

  1.  
  2. /*  A Bison parser, made from calc.y  */
  3.  
  4. #define    NUM    258
  5. #define    NEG    259
  6.  
  7. #line 3 "calc.y"
  8.  
  9.      #define YYSTYPE double
  10.      #include <math.h>
  11.      
  12. #ifndef YYLTYPE
  13. typedef
  14.   struct yyltype
  15.     {
  16.       int timestamp;
  17.       int first_line;
  18.       int first_column;
  19.       int last_line;
  20.       int last_column;
  21.       char *text;
  22.    }
  23.   yyltype;
  24.  
  25. #define YYLTYPE yyltype
  26. #endif
  27.  
  28. #ifndef YYSTYPE
  29. #define YYSTYPE int
  30. #endif
  31. #include <stdio.h>
  32.  
  33. #ifndef __STDC__
  34. #define const
  35. #endif
  36.  
  37.  
  38.  
  39. #define    YYFINAL        23
  40. #define    YYFLAG        -32768
  41. #define    YYNTBASE    13
  42.  
  43. #define YYTRANSLATE(x) ((unsigned)(x) <= 259 ? yytranslate[x] : 16)
  44.  
  45. static const char yytranslate[] = {     0,
  46.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  47.      2,     2,    10,     2,     2,     2,     2,     2,     2,     2,
  48.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  49.      2,     2,     2,     2,     2,     2,     2,     2,     2,    11,
  50.     12,     6,     5,     2,     4,     2,     7,     2,     2,     2,
  51.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  52.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  53.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  54.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  55.      2,     2,     2,     9,     2,     2,     2,     2,     2,     2,
  56.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  57.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  58.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  59.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  60.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  61.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  62.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  63.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  64.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  65.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  66.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  67.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  68.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  69.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  70.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  71.      2,     2,     2,     2,     2,     1,     2,     3,     8
  72. };
  73.  
  74. static const short yyrline[] = {     0,
  75.     16,    17,    20,    21,    24,    25,    26,    27,    28,    29,
  76.     30,    31
  77. };
  78.  
  79. static const char * const yytname[] = {     0,
  80. "error","$illegal.","NUM","'-'","'+'","'*'","'/'","NEG","'^'","'\\n'",
  81. "'('","')'","input"
  82. };
  83.  
  84. static const short yyr1[] = {     0,
  85.     13,    13,    14,    14,    15,    15,    15,    15,    15,    15,
  86.     15,    15
  87. };
  88.  
  89. static const short yyr2[] = {     0,
  90.      0,     2,     1,     2,     1,     3,     3,     3,     3,     2,
  91.      3,     3
  92. };
  93.  
  94. static const short yydefact[] = {     1,
  95.      0,     5,     0,     3,     0,     2,     0,    10,     0,     0,
  96.      0,     0,     0,     0,     4,    12,     7,     6,     8,     9,
  97.     11,     0,     0
  98. };
  99.  
  100. static const short yydefgoto[] = {     1,
  101.      6,     7
  102. };
  103.  
  104. static const short yypact[] = {-32768,
  105.     12,-32768,     2,-32768,     2,-32768,    29,    -8,    20,     2,
  106.      2,     2,     2,     2,-32768,-32768,    11,    11,    -8,    -8,
  107.     -8,     3,-32768
  108. };
  109.  
  110. static const short yypgoto[] = {-32768,
  111. -32768,    -3
  112. };
  113.  
  114.  
  115. #define    YYLAST        39
  116.  
  117.  
  118. static const short yytable[] = {     8,
  119.     14,     9,    23,     0,     2,     3,    17,    18,    19,    20,
  120.     21,    22,     5,     0,     2,     3,    12,    13,     0,    14,
  121.      0,     4,     5,    10,    11,    12,    13,     0,    14,     0,
  122.      0,    16,    10,    11,    12,    13,     0,    14,    15
  123. };
  124.  
  125. static const short yycheck[] = {     3,
  126.      9,     5,     0,    -1,     3,     4,    10,    11,    12,    13,
  127.     14,     0,    11,    -1,     3,     4,     6,     7,    -1,     9,
  128.     -1,    10,    11,     4,     5,     6,     7,    -1,     9,    -1,
  129.     -1,    12,     4,     5,     6,     7,    -1,     9,    10
  130. };
  131. #define YYPURE 1
  132.  
  133. /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
  134. #line 3 "bison.simple"
  135.  
  136. /* Skeleton output parser for bison,
  137.    Copyright (C) 1984 Bob Corbett and Richard Stallman
  138.  
  139.    This program is free software; you can redistribute it and/or modify
  140.    it under the terms of the GNU General Public License as published by
  141.    the Free Software Foundation; either version 1, or (at your option)
  142.    any later version.
  143.  
  144.    This program is distributed in the hope that it will be useful,
  145.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  146.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  147.    GNU General Public License for more details.
  148.  
  149.    You should have received a copy of the GNU General Public License
  150.    along with this program; if not, write to the Free Software
  151.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  152.  
  153.  
  154. #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__)
  155. #include <alloca.h>
  156. #endif
  157.  
  158. /* This is the parser code that is written into each bison parser
  159.   when the %semantic_parser declaration is not specified in the grammar.
  160.   It was written by Richard Stallman by simplifying the hairy parser
  161.   used when %semantic_parser is specified.  */
  162.  
  163. /* Note: there must be only one dollar sign in this file.
  164.    It is replaced by the list of actions, each action
  165.    as one case of the switch.  */
  166.  
  167. #define yyerrok        (yyerrstatus = 0)
  168. #define yyclearin    (yychar = YYEMPTY)
  169. #define YYEMPTY        -2
  170. #define YYEOF        0
  171. #define YYFAIL        goto yyerrlab;
  172. #define YYACCEPT    return(0)
  173. #define YYABORT     return(1)
  174. #define YYERROR        goto yyerrlab
  175.  
  176. #define YYTERROR    1
  177. #define YYERRCODE    256
  178.  
  179. #ifndef YYIMPURE
  180. #define YYLEX        yylex()
  181. #endif
  182.  
  183. #ifndef YYPURE
  184. #define YYLEX        yylex(&yylval, &yylloc)
  185. #endif
  186.  
  187. /* If nonreentrant, generate the variables here */
  188.  
  189. #ifndef YYIMPURE
  190.  
  191. int    yychar;            /*  the lookahead symbol        */
  192. YYSTYPE    yylval;            /*  the semantic value of the        */
  193.                 /*  lookahead symbol            */
  194.  
  195. YYLTYPE yylloc;            /*  location data for the lookahead    */
  196.                 /*  symbol                */
  197.  
  198. int yynerrs;            /*  number of parse errors so far       */
  199. #endif  /* YYIMPURE */
  200.  
  201. #if YYDEBUG != 0
  202. int yydebug;            /*  nonzero means print parse trace    */
  203. /* Since this is uninitialized, it does not stop multiple parsers
  204.    from coexisting.  */
  205. #endif
  206.  
  207. /*  YYMAXDEPTH indicates the initial size of the parser's stacks    */
  208.  
  209. #ifndef    YYMAXDEPTH
  210. #define YYMAXDEPTH 200
  211. #endif
  212.  
  213. /*  YYMAXLIMIT is the maximum size the stacks can grow to
  214.     (effective only if the built-in stack extension method is used).  */
  215.  
  216. #ifndef YYMAXLIMIT
  217. #define YYMAXLIMIT 10000
  218. #endif
  219.  
  220.  
  221. #line 90 "bison.simple"
  222. int
  223. yyparse()
  224. {
  225.   register int yystate;
  226.   register int yyn;
  227.   register short *yyssp;
  228.   register YYSTYPE *yyvsp;
  229.   YYLTYPE *yylsp;
  230.   int yyerrstatus;    /*  number of tokens to shift before error messages enabled */
  231.   int yychar1;        /*  lookahead token as an internal (translated) token number */
  232.  
  233.   short    yyssa[YYMAXDEPTH];    /*  the state stack            */
  234.   YYSTYPE yyvsa[YYMAXDEPTH];    /*  the semantic value stack        */
  235.   YYLTYPE yylsa[YYMAXDEPTH];    /*  the location stack            */
  236.  
  237.   short *yyss = yyssa;        /*  refer to the stacks thru separate pointers */
  238.   YYSTYPE *yyvs = yyvsa;    /*  to allow yyoverflow to reallocate them elsewhere */
  239.   YYLTYPE *yyls = yylsa;
  240.  
  241.   int yymaxdepth = YYMAXDEPTH;
  242.  
  243. #ifndef YYPURE
  244.   int yychar;
  245.   YYSTYPE yylval;
  246.   YYLTYPE yylloc;
  247.   int yynerrs;
  248. #endif
  249.  
  250.   YYSTYPE yyval;        /*  the variable used to return        */
  251.                 /*  semantic values from the action    */
  252.                 /*  routines                */
  253.  
  254.   int yylen;
  255.  
  256. #if YYDEBUG != 0
  257.   if (yydebug)
  258.     fprintf(stderr, "Starting parse\n");
  259. #endif
  260.  
  261.   yystate = 0;
  262.   yyerrstatus = 0;
  263.   yynerrs = 0;
  264.   yychar = YYEMPTY;        /* Cause a token to be read.  */
  265.  
  266.   /* Initialize stack pointers.
  267.      Waste one element of value and location stack
  268.      so that they stay on the same level as the state stack.  */
  269.  
  270.   yyssp = yyss - 1;
  271.   yyvsp = yyvs;
  272.   yylsp = yyls;
  273.  
  274. /* Push a new state, which is found in  yystate  .  */
  275. /* In all cases, when you get here, the value and location stacks
  276.    have just been pushed. so pushing a state here evens the stacks.  */
  277. yynewstate:
  278.  
  279.   *++yyssp = yystate;
  280.  
  281.   if (yyssp >= yyss + yymaxdepth - 1)
  282.     {
  283.       /* Give user a chance to reallocate the stack */
  284.       /* Use copies of these so that the &'s don't force the real ones into memory. */
  285.       YYSTYPE *yyvs1 = yyvs;
  286.       YYLTYPE *yyls1 = yyls;
  287.       short *yyss1 = yyss;
  288.  
  289.       /* Get the current used size of the three stacks, in elements.  */
  290.       int size = yyssp - yyss + 1;
  291.  
  292. #ifdef yyoverflow
  293.       /* Each stack pointer address is followed by the size of
  294.      the data in use in that stack, in bytes.  */
  295.       yyoverflow("parser stack overflow",
  296.          &yyss1, size * sizeof (*yyssp),
  297.          &yyvs1, size * sizeof (*yyvsp),
  298.          &yyls1, size * sizeof (*yylsp),
  299.          &yymaxdepth);
  300.  
  301.       yyss = yyss1; yyvs = yyvs1; yyls = yyls1;
  302. #else /* no yyoverflow */
  303.       /* Extend the stack our own way.  */
  304.       if (yymaxdepth >= YYMAXLIMIT)
  305.     yyerror("parser stack overflow");
  306.       yymaxdepth *= 2;
  307.       if (yymaxdepth > YYMAXLIMIT)
  308.     yymaxdepth = YYMAXLIMIT;
  309.       yyss = (short *) alloca (yymaxdepth * sizeof (*yyssp));
  310.       bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
  311.       yyvs = (YYSTYPE *) alloca (yymaxdepth * sizeof (*yyvsp));
  312.       bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
  313. #ifdef YYLSP_NEEDED
  314.       yyls = (YYLTYPE *) alloca (yymaxdepth * sizeof (*yylsp));
  315.       bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
  316. #endif
  317. #endif /* no yyoverflow */
  318.  
  319.       yyssp = yyss + size - 1;
  320.       yyvsp = yyvs + size - 1;
  321. #ifdef YYLSP_NEEDED
  322.       yylsp = yyls + size - 1;
  323. #endif
  324.  
  325. #if YYDEBUG != 0
  326.       if (yydebug)
  327.     fprintf(stderr, "Stack size increased to %d\n", yymaxdepth);
  328. #endif
  329.  
  330.       if (yyssp >= yyss + yymaxdepth - 1)
  331.     YYABORT;
  332.     }
  333.  
  334. #if YYDEBUG != 0
  335.   if (yydebug)
  336.     fprintf(stderr, "Entering state %d\n", yystate);
  337. #endif
  338.  
  339. /* Do appropriate processing given the current state.  */
  340. /* Read a lookahead token if we need one and don't already have one.  */
  341. yyresume:
  342.  
  343.   /* First try to decide what to do without reference to lookahead token.  */
  344.  
  345.   yyn = yypact[yystate];
  346.   if (yyn == YYFLAG)
  347.     goto yydefault;
  348.  
  349.   /* Not known => get a lookahead token if don't already have one.  */
  350.  
  351.   /* yychar is either YYEMPTY or YYEOF
  352.      or a valid token in external form.  */
  353.  
  354.   if (yychar == YYEMPTY)
  355.     {
  356. #if YYDEBUG != 0
  357.       if (yydebug)
  358.     fprintf(stderr, "Reading a token: ");
  359. #endif
  360.       yychar = YYLEX;
  361.     }
  362.  
  363.   /* Convert token to internal form (in yychar1) for indexing tables with */
  364.  
  365.   if (yychar <= 0)        /* This means end of input. */
  366.     {
  367.       yychar1 = 0;
  368.       yychar = YYEOF;        /* Don't call YYLEX any more */
  369.  
  370. #if YYDEBUG != 0
  371.       if (yydebug)
  372.     fprintf(stderr, "Now at end of input.\n");
  373. #endif
  374.     }
  375.   else
  376.     {
  377.       yychar1 = YYTRANSLATE(yychar);
  378.  
  379. #if YYDEBUG != 0
  380.       if (yydebug)
  381.     fprintf(stderr, "Next token is %d (%s)\n", yychar, yytname[yychar1]);
  382. #endif
  383.     }
  384.  
  385.   yyn += yychar1;
  386.   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
  387.     goto yydefault;
  388.  
  389.   yyn = yytable[yyn];
  390.  
  391.   /* yyn is what to do for this token type in this state.
  392.      Negative => reduce, -yyn is rule number.
  393.      Positive => shift, yyn is new state.
  394.        New state is final state => don't bother to shift,
  395.        just return success.
  396.      0, or most negative number => error.  */
  397.  
  398.   if (yyn < 0)
  399.     {
  400.       if (yyn == YYFLAG)
  401.     goto yyerrlab;
  402.       yyn = -yyn;
  403.       goto yyreduce;
  404.     }
  405.   else if (yyn == 0)
  406.     goto yyerrlab;
  407.  
  408.   if (yyn == YYFINAL)
  409.     YYACCEPT;
  410.  
  411.   /* Shift the lookahead token.  */
  412.  
  413. #if YYDEBUG != 0
  414.   if (yydebug)
  415.     fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
  416. #endif
  417.  
  418.   /* Discard the token being shifted unless it is eof.  */
  419.   if (yychar != YYEOF)
  420.     yychar = YYEMPTY;
  421.  
  422.   *++yyvsp = yylval;
  423. #ifdef YYLSP_NEEDED
  424.   *++yylsp = yylloc;
  425. #endif
  426.  
  427.   /* count tokens shifted since error; after three, turn off error status.  */
  428.   if (yyerrstatus) yyerrstatus--;
  429.  
  430.   yystate = yyn;
  431.   goto yynewstate;
  432.  
  433. /* Do the default action for the current state.  */
  434. yydefault:
  435.  
  436.   yyn = yydefact[yystate];
  437.   if (yyn == 0)
  438.     goto yyerrlab;
  439.  
  440. /* Do a reduction.  yyn is the number of a rule to reduce with.  */
  441. yyreduce:
  442.   yylen = yyr2[yyn];
  443.   yyval = yyvsp[1-yylen]; /* implement default value of the action */
  444.  
  445. #if YYDEBUG != 0
  446.   if (yydebug)
  447.     {
  448.       if (yylen == 1)
  449.     fprintf (stderr, "Reducing 1 value via line %d, ",
  450.          yyrline[yyn]);
  451.       else
  452.     fprintf (stderr, "Reducing %d values via line %d, ",
  453.          yylen, yyrline[yyn]);
  454.     }
  455. #endif
  456.  
  457.  
  458.   switch (yyn) {
  459.  
  460. case 4:
  461. #line 21 "calc.y"
  462. { printf("\t%.10g\n", yyvsp[-1]); ;
  463.     break;}
  464. case 5:
  465. #line 24 "calc.y"
  466. { yyval = yyvsp[0];         ;
  467.     break;}
  468. case 6:
  469. #line 25 "calc.y"
  470. { yyval = yyvsp[-2] + yyvsp[0];    ;
  471.     break;}
  472. case 7:
  473. #line 26 "calc.y"
  474. { yyval = yyvsp[-2] - yyvsp[0];    ;
  475.     break;}
  476. case 8:
  477. #line 27 "calc.y"
  478. { yyval = yyvsp[-2] * yyvsp[0];    ;
  479.     break;}
  480. case 9:
  481. #line 28 "calc.y"
  482. { yyval = yyvsp[-2] / yyvsp[0];    ;
  483.     break;}
  484. case 10:
  485. #line 29 "calc.y"
  486. { yyval = -yyvsp[0];        ;
  487.     break;}
  488. case 11:
  489. #line 30 "calc.y"
  490. { yyval = pow (yyvsp[-2], yyvsp[0]); ;
  491.     break;}
  492. case 12:
  493. #line 31 "calc.y"
  494. { yyval = yyvsp[-1];         ;
  495.     break;}
  496. }
  497.    /* the action file gets copied in in place of this dollarsign */
  498. #line 327 "bison.simple"
  499.  
  500.   yyvsp -= yylen;
  501.   yyssp -= yylen;
  502. #ifdef YYLSP_NEEDED
  503.   yylsp -= yylen;
  504. #endif
  505.  
  506. #if YYDEBUG != 0
  507.   if (yydebug)
  508.     {
  509.       short *ssp1 = yyss - 1;
  510.       fprintf (stderr, "state stack now");
  511.       while (ssp1 != yyssp)
  512.     fprintf (stderr, " %d", *++ssp1);
  513.       fprintf (stderr, "\n");
  514.     }
  515. #endif
  516.  
  517.   *++yyvsp = yyval;
  518.  
  519. #ifdef YYLSP_NEEDED
  520.   yylsp++;
  521.   if (yylen == 0)
  522.     {
  523.       yylsp->first_line = yylloc.first_line;
  524.       yylsp->first_column = yylloc.first_column;
  525.       yylsp->last_line = (yylsp-1)->last_line;
  526.       yylsp->last_column = (yylsp-1)->last_column;
  527.       yylsp->text = 0;
  528.     }
  529.   else
  530.     {
  531.       yylsp->last_line = (yylsp+yylen-1)->last_line;
  532.       yylsp->last_column = (yylsp+yylen-1)->last_column;
  533.     }
  534. #endif
  535.  
  536.   /* Now "shift" the result of the reduction.
  537.      Determine what state that goes to,
  538.      based on the state we popped back to
  539.      and the rule number reduced by.  */
  540.  
  541.   yyn = yyr1[yyn];
  542.  
  543.   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  544.   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  545.     yystate = yytable[yystate];
  546.   else
  547.     yystate = yydefgoto[yyn - YYNTBASE];
  548.  
  549.   goto yynewstate;
  550.  
  551. yyerrlab:   /* here on detecting error */
  552.  
  553.   if (! yyerrstatus)
  554.     /* If not already recovering from an error, report this error.  */
  555.     {
  556.       ++yynerrs;
  557.       yyerror("parse error");
  558.     }
  559.  
  560.   if (yyerrstatus == 3)
  561.     {
  562.       /* if just tried and failed to reuse lookahead token after an error, discard it.  */
  563.  
  564.       /* return failure if at end of input */
  565.       if (yychar == YYEOF)
  566.     YYABORT;
  567.  
  568. #if YYDEBUG != 0
  569.       if (yydebug)
  570.     fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
  571. #endif
  572.  
  573.       yychar = YYEMPTY;
  574.     }
  575.  
  576.   /* Else will try to reuse lookahead token
  577.      after shifting the error token.  */
  578.  
  579.   yyerrstatus = 3;        /* Each real token shifted decrements this */
  580.  
  581.   goto yyerrhandle;
  582.  
  583. yyerrdefault:  /* current state does not do anything special for the error token. */
  584.  
  585. #if 0
  586.   /* This is wrong; only states that explicitly want error tokens
  587.      should shift them.  */
  588.   yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  589.   if (yyn) goto yydefault;
  590. #endif
  591.  
  592. yyerrpop:   /* pop the current state because it cannot handle the error token */
  593.  
  594.   if (yyssp == yyss) YYABORT;
  595.   yyvsp--;
  596.   yystate = *--yyssp;
  597. #ifdef YYLSP_NEEDED
  598.   yylsp--;
  599. #endif
  600.  
  601. #if YYDEBUG != 0
  602.   if (yydebug)
  603.     {
  604.       short *ssp1 = yyss - 1;
  605.       fprintf (stderr, "Error: state stack now");
  606.       while (ssp1 != yyssp)
  607.     fprintf (stderr, " %d", *++ssp1);
  608.       fprintf (stderr, "\n");
  609.     }
  610. #endif
  611.  
  612. yyerrhandle:
  613.  
  614.   yyn = yypact[yystate];
  615.   if (yyn == YYFLAG)
  616.     goto yyerrdefault;
  617.  
  618.   yyn += YYTERROR;
  619.   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
  620.     goto yyerrdefault;
  621.  
  622.   yyn = yytable[yyn];
  623.   if (yyn < 0)
  624.     {
  625.       if (yyn == YYFLAG)
  626.     goto yyerrpop;
  627.       yyn = -yyn;
  628.       goto yyreduce;
  629.     }
  630.   else if (yyn == 0)
  631.     goto yyerrpop;
  632.  
  633.   if (yyn == YYFINAL)
  634.     YYACCEPT;
  635.  
  636. #if YYDEBUG != 0
  637.   if (yydebug)
  638.     fprintf(stderr, "Shifting error token, ");
  639. #endif
  640.  
  641.   *++yyvsp = yylval;
  642. #ifdef YYLSP_NEEDED
  643.   *++yylsp = yylloc;
  644. #endif
  645.  
  646.   yystate = yyn;
  647.   goto yynewstate;
  648. }
  649. #line 34 "calc.y"
  650.  
  651.